﻿using System;

namespace Rail.Demo.Controller
{
    public class QueryTableDemoCommand : Base.BaseCommand
    {
        public override void Execute(PureMVC.Interfaces.INotification notification)
        {
            try
            {
                var dt = Commons.MySqlHelper.GetDataTable("SELECT * FROM T_TEST01", "t_test01");
                SendNotification(Commons.Messages.SHOW_QUERY_TEST, dt);
            }
            catch (Exception ex)
            {
                Commons.LogHelper.Error(ex.Message);
                SendNotification(Commons.Messages.SHOWERRORMESSAGE, "查询发生错误" + ex.StackTrace);
            }
        }
    }
}
